#ifndef IDOCUMENT_H
#define IDOCUMENT_H

#include <QtCore/QObject>
#include <QtCore/QMetaType>
#include <QtCore/QSharedPointer>
#include <QtGui/QTextDocument>

class IDocument : public QObject
{
    Q_OBJECT

public:
    virtual void setValid(bool valid) = 0;
    virtual bool isValid() const = 0;

    virtual bool isFuture() const = 0;

    virtual bool isDirty() const = 0;
    virtual QString name() const = 0;

    virtual void setDirty(bool dirty = true) = 0;
    virtual void setFuture(bool future = true) = 0;

    virtual void rename(const QString& name) = 0;

    virtual QTextDocument* data() const = 0;

    virtual ~IDocument() {}

signals:
    void dirtyChanged(bool);
    void nameChanged();
    void validityChanged(bool);
};

Q_DECLARE_METATYPE(QSharedPointer<IDocument>)

#endif
